-
Notifications
You must be signed in to change notification settings - Fork 12
Conversation
I did waste the last 2 hours trying to connect to the tipeeestream socket und just rage quitted. Looking at your pr it seems like I just had the wrong url, I tried connecting to So thanks a lot for your pr, I'll later take some more time for a propper review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your PR is looking pretty good, I couldn't find any real problems. 😃👍
I just highlighted some smaller things I'dd do in a different way
private val eventHandler = ListBuffer[Consumer[TipeeeStreamEvent]]() | ||
private val apiKey = "apiKey" | ||
private val username = "username" | ||
override protected var requiredCredentialKeys: List[String] = List(apiKey, username) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Must this username be the username of the tipeestream user or can it be anything?
If it can be anything wouldn't it be better to use the chatoverflow-
+ the source identifier rather than having to specify a username each time?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it has to be the tipeeestream username. If we can trust the docs 😆 Let's just try if it is necessary
override protected var optionalCredentialKeys: List[String] = List() | ||
private var socket: Socket = _ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer to have an empty optional here for two reasons:
- Eliminating null values from the code (this prevents a lot of trouble in general, altought in this special case it isn't a problem)
- Consistency with other services (just have a look how it is done in DiscordConnector )
|
||
import scala.collection.mutable.ListBuffer | ||
|
||
class TipeeeStreamListener { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't used anywhere. Just remove it.
Are you planning to also implement the Rest API and more specific stuff like providers? |
Yeah finding the url was like the hardest part 😅 . After realizing the url in the docs doesn't work, I wrote an email to the support. They provided me with the following url: https://api.tipeeestream.com/v2.0/site/socket. Maybe the url for the Socket.io API changes from time to time and we have to make a REST call to get the current url. For now, I just hard coded it.
I think I find time tomorrow to look into the changes you suggested. After that, I am not planning on implementing the different providers and the Rest API. You are free to work on it. |
I just don't get why they don't update their api documentation...
Then I'll just create a new tipeestream branch on the main repo based on your pr where I continue to work on tipeeestream and merge it once I'm finished. Are you on our discord server? I'd love to give you the contributor role^^ |
Added basic TipeeeStream implementation for incoming events
Current supported events: